<#include "${basePath}/common/head.html"/>
<script type="text/javascript">
	if (self != top) { //主页不允许在iframe中
		top.window.location.reload();
	}
</script>
<style type="text/css">
body {
	background: #ebebeb;
	font-family: "helvetica neue", "hiragino sans gb", "microsoft yahei",
		"\9ed1\4f53", arial, sans-serif;
	color: #222;
	font-size: 12px;
}

* {
	padding: 0px;
	margin: 0px;
}

.top_div {
	background: #008ead;
	width: 100%;
	height: 400px;
}

.ipt {
	border: 1px solid #d3d3d3;
	padding: 10px 10px;
	width: 290px;
	border-radius: 4px;
	padding-left: 35px;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
	-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow
		ease-in-out .15s;
	-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out
		.15s;
	transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s
}

.ipt:focus {
	border-color: #66afe9;
	outline: 0;
	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px
		rgba(102, 175, 233, .6);
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px
		rgba(102, 175, 233, .6)
}

.u_logo {
	background: url("res/images/login/username.png") no-repeat;
	padding: 10px 10px;
	position: absolute;
	top: 43px;
	left: 40px;
}

.p_logo {
	background: url("res/images/login/password.png") no-repeat;
	padding: 10px 10px;
	position: absolute;
	top: 12px;
	left: 40px;
}

a {
	text-decoration: none;
}
</style>

<script type="text/javascript">
	
	//回车登陆
	document.onkeydown = function() {
		if (event.keycode == 13) {
			login();
			return false;
		}
	};

	function login() {
		if($("#ff").form('enableValidation').form('validate')) {
			var param = {"user_name":$(":input[name='user_name']").val(), "password":$(":input[name='password']").val()};
			$.post("${basePath}/login/login", param, function(data) {
				if(data.result == "success") {
					$('#ff').submit();
					location.href = "main";
				}else {
					showWarnMsg(data.msg);
				}
			});
		}
		}		
	
</script>

<div class="top_div"></div>

<div
	style="background: rgb(255, 255, 255); margin: -100px auto auto; border: 1px solid rgb(231, 231, 231); border-image: none; width: 400px; height: 200px; text-align: center;">
	
	<div style="width: 165px; height: 96px; position: absolute;">
		
		<div class="tou"></div>
		<div class="initial_left_hand" id="left_hand"></div>
		<div class="initial_right_hand" id="right_hand"></div>
	</div>
	<form id="ff" method="post" action="${basePath}/main">
		<p style="padding: 30px 0px 10px; position: relative;">
			<span class="u_logo"></span> <input class="ipt" type="text"
				value="readonly" name="user_name" id="user_name"
				options="required:true"></input>
		</p>		
		<p style="position: relative;">
			<span class="p_logo"></span> <input class="ipt" type="password"
				value="123456" name="password" id="password"></input>

		</p>
		<div
			style="height: 50px; line-height: 50px; margin-top: 30px; border-top-color: rgb(231, 231, 231); border-top-width: 1px; border-top-style: solid;">
			<p style="margin: 0px 35px 20px 45px;">
			<!-- 
				<span style="float: left;"><a
					style="color: rgb(204, 204, 204);" href="#">忘记密码?</a></span> 
					 -->
				<span
					style="float: right;"><!-- <a
					style="color: rgb(204, 204, 204); margin-right: 20px;" href="#">注册</a> -->
					<a href="javascript:void(0)"
					style="width:200px;background: rgb(0, 142, 173); padding: 7px 10px; border-radius: 4px; border: 1px solid rgb(26, 117, 152); border-image: none; color: rgb(255, 255, 255); font-weight: bold;"
					onclick="login()">登录系统</a> </span>
			</p>
		</div>		
		<div style="color: blue; color: #708080; padding: 8px;">
			<a href="###" style="color: red"
				onclick="$('#user_name').val('zhong');"> zhong </a>登陆，模拟库管员角色
		</div>
		<div style="color: red; color: #608080; padding: 8px;">
			<a href="###" style="color: blue"
				onclick="$('#user_name').val('zhangsan');"> zhangsan </a>登陆，模拟仓储部部长角色
		</div>
	</form>
</div>
<#include "${basePath}/common/foot.html"/>
